﻿@model Player

@{
    ViewBag.Title = "Redigér din profil";
}

<div class="page-header">
    <h1><span class="glyphicon glyphicon-calendar"></span> @ViewBag.Title</h1>
</div>


@if (!ViewData.ModelState.IsValid)
{
    <div class="alert alert-danger alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        @Html.ValidationSummary("", new { @style = "color: #fff;" })
    </div>
}

@using (Html.BeginForm("Edit", "Player", FormMethod.Post, new { role = "form", @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()
    @Html.HiddenFor(p => p.Id)

    <div class="panel panel-title">
        <h4>Basis info</h4>
    </div>
    <div class="panel panel-body">
        @Html.EditorFor(p => p.GivenName)
        @Html.EditorFor(p => p.LastName)
        @Html.EditorFor(p => p.Sex)
        @Html.EditorFor(p => p.Email)
        @Html.EditorFor(p => p.MobilePhone)
        @Html.EditorFor(p => p.Address)
        @Html.EditorFor(p => p.ZipCode)
        @Html.EditorFor(p => p.City)
        @Html.EditorFor(p => p.Birthdate)
        <div class="form-group">
            <label for="CourseId" class="col-sm-2 col-lg-2 control-label">Hjemmeklub</label>
            <div class="col-sm-8 col-lg-8">
                <div class="input-group">
                    <span class="input-group-addon"><span class="glyphicon glyphicon-home"></span></span>
                    @Html.DropDownListFor(m => m.CourseId, new SelectList(ViewBag.Courses, "Id", "Name"), "Vælg bane..", new { @class = "form-control" })
                </div>
            </div>
        </div>
        @Html.EditorFor(p => p.MemberNumber)
        @Html.EditorFor(p => p.Hcp)
        @Html.EditorFor(p => p.SendEventMails)

        <div class="form-group">
            <label for="create" class="col-sm-2 col-lg-2 control-label"></label>
            <div class="col-sm-8 col-lg-8">
                <button type="submit" class="btn btn-default">Gem</button>
            </div>
        </div>
    </div>

    <div class="panel panel-title">
        <h4>Udstyr</h4>
    </div>
    <div class="panel panel-body">
        @Html.EditorFor(u => u.Driver)
        @Html.EditorFor(u => u.Irons)
        @Html.EditorFor(u => u.Putter)
        @Html.EditorFor(u => u.Balls)
    </div>

    <div class="panel panel-title">
        <h4>Ambitioner</h4>
    </div>
    <div class="panel panel-body">
        @Html.EditorFor(a => a.RoleModel)
        @Html.EditorFor(a => a.StrongFeatures)
        @Html.EditorFor(a => a.WeakFeatures)
        @Html.EditorFor(a => a.BestRound)
        @Html.EditorFor(a => a.SeasonObjective)

        <div class="form-group">
            <label for="create" class="col-sm-2 col-lg-2 control-label"></label>
            <div class="col-sm-8 col-lg-8">
                <button type="submit" class="btn btn-default">Gem</button>
            </div>
        </div>

        <div class="form-group">
            <label class="col-md-2"></label>
            <div class="alert alert-info col-md-8">
                Dit Password skiftes på den nye @Html.ActionLink("konto side", "Manage", "Account").
            </div>
        </div>
    </div>
}

@section Scripts {
    @Scripts.Render("~/bundles/globalize")
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/Scripts/_thecup_editing.js")
}
